<div layout="row" layout-wrap ng-show="user">
    <div flex>
        <md-card>
            <md-card-header>
                <md-card-header-text style="word-break: keep-all; white-space:nowrap; overflow: hidden; text-overflow:ellipsis;">
                    <span class="md-headline">{{user.username}}</span>
                </md-card-header-text>
            </md-card-header>
            <md-card-content>
              <md-list>
                  <md-divider></md-divider>
                  <md-list-item>
                      <div flex layout="row" layout-align="space-between center">
                          <div flex="30">注册时间</div>
                          <div flex="70" style="text-align: right;" ng-if="user.createTime">
                              <span style="font-size: 0.9em;">{{ user.createTime | date : 'yyyy-MM-dd HH:mm' }}</span><br><span style="font-size: 0.9em;">{{ user.createTime | timeagoshort }}</span>
                          </div>
                      </div>
                  </md-list-item>
                  <md-divider></md-divider>
                  <md-list-item>
                      <div flex layout="row" layout-align="space-between center">
                          <div flex="30">上次登录</div>
                          <div flex="70" style="text-align: right;" ng-if="user.lastLogin">
                              <span style="font-size: 0.9em;">{{ user.lastLogin | date : 'yyyy-MM-dd HH:mm' }}</span><br><span style="font-size: 0.9em;">{{ user.lastLogin | timeagoshort }}</span>
                          </div>
                      </div>
                  </md-list-item>
                  <md-divider></md-divider>
                  <md-list-item>
                        <div flex layout="row" layout-align="space-between center">
                            <div flex="30">分组</div>
                            <div flex="70" style="text-align: right;">{{ groupInfo[user.group].name }}</div>
                        </div>
                    </md-list-item>
                    <md-divider></md-divider>
              </md-list>
              <div flex layout="row">
                  <md-button class="md-primary" ng-click="setUserGroup()">设置分组</md-button>
                  <md-button class="md-warn" ng-click="deleteUser()">删除用户</md-button>
              </div>
            </md-card-content>
        </md-card>
    </div>
</div>
